A Gray code for fixed-density necklaces and Lyndon words in constant amortized time
نویسندگان
چکیده
This paper develops a constant amortized time algorithm to produce a cyclic cool-lex Gray code for fixed-density binary necklaces, Lyndon words, and pseudo-necklaces. It is the first Gray code for these objects that achieves this time bound. The algorithm is applied: (i) to develop a constant amortized time cyclic Gray code for necklaces, Lyndon words, and pseudo-necklaces ordered by density and (ii) to obtain a fixed-density de Bruijn sequence using constant time per n bits on average. In addition to Gray code order, the algorithms can be easily modified to output the strings in co-lex order.
منابع مشابه
A CAT Gray code for fixed-density necklaces and Lyndon words
This paper develops a constant amortized time algorithm to produce the cyclic cool-lex Gray code for fixed-density binary necklaces, Lyndon words, and pseudo-necklaces. It is the first Gray code for these objects that achieves this time bound. In addition to Gray code order, the algorithms can be easily modified to output the strings in co-lex order.
متن کاملFixed-Density Necklaces and Lyndon Words in Cool-lex Order
This paper creates a simple Gray code for fixed-density binary necklaces and Lyndon words. The Gray code is simultaneously a left-shift Gray code and a 2-transposition Gray code and is cyclic with these properties. It also has the advantage of using canonical representations (lexicographically minimum rotations) yielding the first known Gray code for Lyndon words ordered by density. This work s...
متن کاملGenerating Lyndon brackets.: An addendum to: Fast algorithms to generate necklaces, unlabeled necklaces and irreducible polynomials over GF(2)
It is well known that the Lyndon words of length n can be used to construct a basis for the n-th homogeneous component of the free Lie algebra. We develop an algorithm that uses a dynamic programming table to efficiently generate the standard bracketing for all Lyndon words of length n, thus constructing a basis for the n-th homogeneous component of the free Lie algebra. The algorithm runs in l...
متن کاملGray codes for necklaces and Lyndon words of arbitrary base
Recently, a Gray code for unrestricted binary necklaces and their relatives was discovered by Vajnovszki [Discrete Mathematics & Theoretical Computer Science, to appear]. The Gray code is constructed by modifying the classical FKM algorithm for generating necklaces in lexicographic order. We present a generalisation of Vajnovszki’s algorithm, giving a Gray code for necklaces and their relatives...
متن کاملEfficient Oracles for Generating Binary Bubble Languages
Given a string α = 10γ in a binary language L, the bubble lower bound is the smallest non-negative integer j such that 1s−10t−j10jγ ∈ L. We present an efficient oracle, which is a function that returns the bubble lower bound, for a number of fixed-density languages including: k-ary Dyck words, connected unit interval graphs, linear-extensions ofB-posets, those lexicographically larger than ω, t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Theor. Comput. Sci.
دوره 502 شماره
صفحات -
تاریخ انتشار 2013